package com.yuju.rpt.enums;

/**
 * 类名：CheckinCustomTypeReturnCodeEnum  <br />
 *
 * 功能：
 *
 * @author : jiaokn <br />
 * @Date : 2018年2月5日 下午8:25:52  <br />
 * @version : 1.1 <br />
 */
public enum CheckinCustomTypeReturnCodeEnum {
	
	CHECKINCUSTOMTYPE_SAVE_SUCCESS("yuju-checkinCustomType-1001", "入住分析（按客源）保存成功"),
	CHECKINCUSTOMTYPE_SAVE_FAILURE("yuju-checkinCustomType-1002", "入住分析（按客源）保存失败"),
	CHECKINCUSTOMTYPE_GET_SUCCESS("yuju-checkinCustomType-1003", "入住分析（按客源）查询成功"),
	CHECKINCUSTOMTYPE_GET_FAILURE("yuju-checkinCustomType-1004", "入住分析（按客源）查询失败"),
	CHECKINCUSTOMTYPEDETAIL_SAVE_SUCCESS("yuju-checkinCustomType-1005", "入住分析详情（按客源）保存成功"),
	CHECKINCUSTOMTYPEDETAIL_SAVE_FAILURE("yuju-checkinCustomType-1006", "入住分析详情（按客源）保存失败"),
	CHECKINCUSTOMTYPEDETAIL_SUM_SUCCESS("yuju-checkinCustomType-1007", "入住分析总计保存成功"),
	CHECKINCUSTOMTYPEDETAIL_SUM_FAILURE("yuju-checkinCustomType-1008", "入住分析总计保存失败");
	
	private String code;
	private String desc;
	
	CheckinCustomTypeReturnCodeEnum(String code, String desc) {
		this.code = code;
		this.desc = desc;
	}
	
	public static String getDescByCode(String code) {
		for (CheckinCustomTypeReturnCodeEnum enume : CheckinCustomTypeReturnCodeEnum.values()) {
			if (enume.getCode().equals(code)) {
				return enume.getDesc();
			}
		}
		
		return "未知枚举类型";
	}

	public String getCode() {
		return code;
	}

	public void setCode(String code) {
		this.code = code;
	}

	public String getDesc() {
		return desc;
	}

	public void setDesc(String desc) {
		this.desc = desc;
	}
	
}
